home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Windows Expert
/
Windows Expert.iso
/
program
/
bmpkit.zip
/
BMPKIT.DOC
< prev
next >
Wrap
Text File
|
1991-10-06
|
2KB
|
50 lines
BMPKIT
By George Campbell
CIS ID: 71571,222
Don Funk from Microsoft gave me a set of routines for dealing with
.BMP files from within Visual Basic.
Using these routines, with some modifications, lets you scale,
print, and display bitmaps in VB applications, something not
included in the internal commands in the language.
Here's a demo application which deals with scaling and printing of
images.
Copy the files into either your VBASIC directory, or a directory of
their own. When working with the source code, you must have the
RIBBONS.BMP file, a Windows background BMP in your VBASIC
directory. When running the program as an .EXE, the BMP file must
be in the directory holding BMPKIT.EXE.
A few notes:
1. Experiment with the StretchBlt variables. You'll find that you
can not only scale, but also crop, etc.
2. The Picture Box holding the original image of the Bitmap does
NOT have to be visible, but must be present.
3. The constants set in the program, as far as I know, can't be
changed without errors creeping in. If you find otherwise, please
let me know.
4. When combining text and lines or circles with bitmaps in
printing, you MUST print everything but the graphics first. Then
end your page with a NewPage/EndDoc combo as shown here.
5. The 3.14 scaling factor used here to make the screen image
scaled properly in inches works for 640X480. Experiment to change
to other resolutions, to get an accurate printout.
Sorry I can't go further in explaining all this, but the source
code is fairly well documented. Good luck.
This information is placed in the public domain for any use
whatever. If you've solved a VB problem, why not do the same thing
with your code. It'll help us all.
George Campbell